package com.avecsys.quotemanager.mbeans.menu;

import javax.swing.tree.DefaultMutableTreeNode;

import com.icesoft.faces.component.tree.IceUserObject;

/**
 * The UrlNodeUserObject object is responsible for storing extra data for a url.
 * The url along with text is bound to a ice:commanLink object which will launch
 * a new browser window pointed to the url.
 */
public class UrlNodeUserObject extends IceUserObject {

	// url to show when a node is clicked
	private String url;

	private String target;

	private boolean selected;

	private boolean headerMenu = true;

	private String menuType;

	// Variable to remember the report id and facility id for the report or
	// dashboard file
	private Long reportId;

	private Long facilityId;

	/**
	 * @return the reportId
	 */
	public Long getReportId() {
		return reportId;
	}

	/**
	 * @param reportId
	 *            the reportId to set
	 */
	public void setReportId(Long reportId) {
		this.reportId = reportId;
	}

	/**
	 * @return the facilityId
	 */
	public Long getFacilityId() {
		return facilityId;
	}

	/**
	 * @param facilityId
	 *            the facilityId to set
	 */
	public void setFacilityId(Long facilityId) {
		this.facilityId = facilityId;
	}

	/**
	 * @return the headerMenu
	 */
	public boolean isHeaderMenu() {
		return headerMenu;
	}

	/**
	 * @param headerMenu
	 *            the headerMenu to set
	 */
	public void setHeaderMenu(boolean headerMenu) {
		this.headerMenu = headerMenu;
	}

	/**
	 * @param wrapper
	 */
	public UrlNodeUserObject(DefaultMutableTreeNode wrapper) {
		super(wrapper);
	}

	/**
	 * Gets the url value of this IceUserObject.
	 * 
	 * @return string representing a URL.
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * Sets the URL.
	 * 
	 * @param url
	 *            a valid URL with protocol information such as
	 *            http://icesoft.com
	 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @return boolean
	 */
	public boolean isSelected() {
		return selected;
	}

	/**
	 * @param selected
	 */
	public void setSelected(boolean selected) {
		this.selected = selected;
	}

	/**
	 * @return String
	 */
	public String getTarget() {
		return target;
	}

	/**
	 * @param target
	 */
	public void setTarget(String target) {
		this.target = target;
	}

	/**
	 * @return the menuType
	 */
	public String getMenuType() {
		return menuType;
	}

	/**
	 * @param menuType
	 *            the menuType to set
	 */
	public void setMenuType(String menuType) {
		this.menuType = menuType;
	}

}
